type A = 'linear'| 'swing'
let a:A = 'linear'

interface B {
    username:string
    age:number
}

let b: keyof B = 'username'
let c: keyof B = "age"

// b = '111'
// c = 123

let obj1:{
    username:string
    age:number
}

//typeof obj1的类型
let z:keyof typeof obj1 = 'username'